<template>
	<view class="money-item">￥120.00</view>
	<view class="tips-item">请尽快完成支付，放弃支付订单将被取消</view>
	<view class="pay-list">
		<radio-group @change="radioChange">
			<label class="flex-alipay">
				<view class="alipay-top">
					<view class="alipay-image">
						<image src="/static/icons/u5056.png" mode=""></image>
					</view>
					<view>支付宝支付</view>
				</view>
				<view class="radio-item">
					<radio :value="1" :checked="value === current" color="#4cd964" />
				</view>
			</label>
			<label class="flex-label">
				<view class="wechat-top">
					<view class="wechat-image">
						<image src="/static/icons/u5060.png"></image>
					</view>
					<view>微信支付</view>
				</view>
				<view class="radio-item">
					<radio :value="0" :checked="true" color="#4cd964" />
				</view>
			</label>
		</radio-group>
	</view>
	<view class="btn-quk">
		<view class="quick-pay" @click="paySuccess">
			立即支付
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import {
		onLoad
	} from '@dcloudio/uni-app'
	const current = ref(0)
	// 接收传过来的签约的id 根绝签约的id 去发支付的请求
	onLoad((options) => {
		console.log('签约id去获取支付请求', options);
	})
	const paySuccess = () => {
		uni.showToast({
			title: '支付成功',
			duration: 1000,
		});
		uni.navigateTo({
			url: '/minePackage/pages/pay-result/pay-result'
		})
	}
	const radioChange = (e) => {
		current.value = e.detail.value
	}
</script>

<style scoped lang="scss">
	.money-item {
		font-size: 56rpx;
		color: #333333;
		font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC';
		font-weight: 650;
		text-align: center;
		margin-top: 30rpx;
		margin-bottom: 30rpx;
	}

	.tips-item {
		font-size: 28rpx;
		color: #999999;
		text-align: center;
		margin-bottom: 30rpx;
	}

	.pay-list {
		width: 750rpx;
		height: 192rpx;
		background-color: #ffffff;
		padding: 0 32rpx;
	}

	.flex-alipay {
		display: flex;
		justify-content: space-between;
		align-items: center;
		// margin-bottom: 30rpx;
		padding-top: 20rpx;
		padding-bottom: 30rpx;
		border-bottom: 1rpx solid #e9e9e9;
	}

	.flex-label {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-top: 30rpx;
		padding-bottom: 20rpx;
	}

	.radio-item {
		margin-right: 60rpx;
	}

	.alipay-payment {
		width: 750rpx;
		height: 96rpx;
		background-color: #ffffff;
		padding: 0 32rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.alipay-top {
		display: flex;
	}

	.wechat-top {
		display: flex;
	}

	.alipay-image {
		margin-right: 20rpx;

		image {
			width: 36rpx;
			height: 36rpx;
		}
	}

	.wechat-pay {
		width: 100%;
		height: 96rpx;
		background-color: #ffffff;
		padding: 0 32rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.wechat-image {
		margin-right: 20rpx;

		image {
			width: 36rpx;
			height: 36rpx;
		}
	}

	.wechat-item {
		margin-right: 60rpx;
	}

	.btn-quk {
		width: 690rpx;
		height: 88rpx;
		padding: 0 32rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		// border: 1rpx solid;


	}

	.quick-pay {
		width: 720rpx;
		height: 88rpx;
		background-color: #2984f8;
		border-radius: 20rpx;
		text-align: center;
		line-height: 88rpx;
		font-size: 32rpx;
		color: #ffffff;
		margin-top: 80rpx;
	}
</style>